package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.GoodsForm;
import com.shensi.api.admin.domian.station.dto.GoodsQueryForm;
import com.shensi.api.admin.domian.station.dto.GradeDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface GradeClient {

    /**
     * 查询等级信息列表
     */
    @GetMapping("/grade/info/list")
    public TableDataInfo list(@SpringQueryMap GradeDto grade);

    /**
     * 新增油品
     */
    @PostMapping("/grade/info")
    public AjaxResult add(@RequestBody GradeDto grade);

    /**
     * 删除油品
     */
    @PostMapping(value = "/grade/info/deleteGrade")
    public AjaxResult deleteGrade(@RequestBody GradeDto grade);


    /**
     * 获取等级信息详细信息
     */
    @GetMapping(value = "/grade/info/{gradeId}")
    public AjaxResult getInfo(@PathVariable("gradeId") Long gradeId);
    /**
     * 修改油站信息
     */
    @PutMapping("/grade/info")
    public AjaxResult edit(@RequestBody GradeDto grade);

}
